#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>

using namespace std;
class person
{
public: string _name = "zhangsan";
	  void func1()
	  {
		  cout << "func1" << endl;
		  cout << _name << " " << _sex << " " << _number << endl;
	  }
	  void modify()
	  {
		  _number = "10086";
	  }
protected:
	string _sex = "nan";
	void func2()
	{
		cout << "func2" << endl;
		cout << _name << " " << _sex << " " << _number << endl;

	}
private:
	string _number = "110";
	void func3()
	{
		cout << "func3" << endl;
		cout << _name << " " << _sex << " " << _number << endl;

	}
};

class student : protected person
{
public:
	void func()
	{
		person::func1();
		person::func2();
    }
	void modify()
	{
		person::modify();
	}
};
void test1()
{
	person p;
	p.func1();
}
void test2()
{
	student s1;
	s1.func();
	student s2;
	s2.modify();
	s2.func();
}
int main()
{
	test2();
	return 0;
}